DOUBLE PRECISION function form1A(x)
	implicit none
	DOUBLE PRECISION x
	form1A = ((x * (2.1 - 0.5 * x)**0.5) / ((1 - x) * (1.1 - 0.5 * x)**0.5)) - 3.69
END

DOUBLE PRECISION function form1B(x)
	implicit none
	DOUBLE PRECISION x
	form1B = tan(x) - x + 1
END

DOUBLE PRECISION function form1C(x)
	implicit none
	DOUBLE PRECISION x
	form1C = (0.5*exp(x/3))-sin(x)
END

DOUBLE PRECISION function contoh(x)
	implicit none
	DOUBLE PRECISION x, t
	t = 1
	contoh = exp(t)**x-5*x**2
END

DOUBLE PRECISION function hitung_epsilon_mesin()
	implicit none
	DOUBLE PRECISION eps
	eps = 1
	do while ((eps+1).GT.1)
		eps = eps/2
	end do
	hitung_epsilon_mesin = eps * 2
END

DOUBLE PRECISION function form1D_x(x, y)
	implicit none
	DOUBLE PRECISION x, y
	form1D_x = sqrt(((2*(y**2))+1)/3)
END

DOUBLE PRECISION function form1D_x_2(x, y)
	implicit none
	DOUBLE PRECISION x, y, akar
	akar = sqrt(1.0/3.0)
	if (abs(x).LT.akar) then
		form1D_x_2 = 0
	else
		form1D_x_2 = sqrt((3*(x**2)-1)/2)
	end if
END

DOUBLE PRECISION function form1D_y(x, y)
	implicit none
	DOUBLE PRECISION x, y
	form1D_y = sqrt(10-((x-1)**2)) - 1
END

subroutine form1D_x_proc(x, y, f, dx, dy)
	implicit none
	DOUBLE PRECISION x, y, f, dx, dy
	f = 3 * (x**2) - 2 * (y**2) - 1
	dx = 6 * x
	dy = -4 * y
END

subroutine form1D_y_proc(x, y, f, dx, dy)
	implicit none
	DOUBLE PRECISION x, y, f, dx, dy
	f = (x**2) - 2 * x + (y**2) + 2 * y - 8
	dx = (2 * x) - 2
	dy = (2 * y) + 2
END 
DOUBLE PRECISION function form2(t)
	implicit none
	DOUBLE PRECISION t
	form2 = (80 * exp(-2*t)) + (20 * exp(-0.1*t)) - 10
END

DOUBLE PRECISION function form2_aksen(t)
	implicit none
	DOUBLE PRECISION t
	form2_aksen = (-160 * exp(-2*t)) + (-2 * exp(-0.1*t))
END

DOUBLE PRECISION function form2_double_aksen(t)
	implicit none
	DOUBLE PRECISION t
	form2_double_aksen = (320 * exp(-2*t)) + (0.2 * exp(-0.1*t))
END

DOUBLE PRECISION function form4(x)
	implicit none
	DOUBLE PRECISION x
	form4 = 1.4*0.00001*x**1.5+1.15*0.00001*x**2-0.01962
	!form4 = x**1.5
END

DOUBLE PRECISION function form3(x)
	implicit none
	DOUBLE PRECISION x,r
	r = 0.99
	form3 = log((1+x*(1-r))/(x*(1-r))) - ((r+1)/(R*(1+(R*(1-r)))))
END

DOUBLE PRECISION function form3_2(x)
	implicit none
	DOUBLE PRECISION x,r
	r = 0.995
	form3_2 = log((1+x*(1-r))/(x*(1-r))) - ((r+1)/(R*(1+(R*(1-r)))))
END


